import { CommonType } from '../../../dto/common.type';
import { Field, ObjectType } from '@nestjs/graphql';
import { IsNotEmpty } from 'class-validator';
import { orderStatustype } from '../models/order.entity';

@ObjectType()
export class OrderType extends CommonType {
  @Field({
    description: '名称',
  })
  name: string;
  @Field({
    description: '订单号',
  })
  @IsNotEmpty()
  orderCode: string;

  @Field({
    description: '手机号',
  })
  tel: string;

  @Field({
    description: '购买者',
  })
  userId: string;

  @Field({
    description: '购买状态',
  })
  status: orderStatustype;

  @Field({
    description: '购买时间',
  })
  buyTime: string;

  @Field({
    description: '购买数量',
  })
  buyNum: number;

  @Field({
    description: '购买金额',
  })
  buyPrice: string;

  @Field({
    description: '购买商品',
  })
  productId: string;

  @Field({
    description: '所属门店',
  })
  orgId: string;
  @Field({
    description: '所属门店名称',
  })
  orgName: string;

  @Field({
    description: '所属门店封面',
  })
  orgLogo: string;

  @Field({
    description: '所属商品封面',
  })
  productLogo: string;

  @Field({
    description: '所属商品名称',
  })
  productName: string;
  @Field({
    description: '所属商品类型',
  })
  productType: string;
}
